import React, { Component } from 'react';
import '../styles/AllShow.scss'
import * as service from '../api/index'

class AllShow extends Component {
    state = {
        allshowlist: []
    }
    async componentDidMount() {
        let res = await service.cate_allshowlist()
        // console.log(res.data.list);
        this.setState({ allshowlist: res.data.list })
    }
    render() {
        return (
            <div className='allshow'>
                {
                    this.state.allshowlist.map((item, index) => {
                        return (
                            <div className="item">
                                <img src={item.pic} alt="" />
                                <div className="text">
                                    <div className="name">
                                        {item.name}
                                    </div>
                                    <div className="time_addr">
                                        <div className="time">
                                            {item.time}
                                        </div>
                                        <div className="address">
                                            {item.address}
                                        </div>
                                    </div>
                                    <div className="price">
                                        ￥{item.price}
                                    </div>
                                </div>
                            </div>
                        )
                    })
                }
            </div>
        );
    }
}

export default AllShow;